import org.junit.Test;

/**
 * @Author: fxy
 * @Date: 2022/01/26/10:13
 * @Description:
 */
public class T1 {
    @Test
    public void t1(){
        String s = "new String()";
        for(int i=0;i<10;i++){
            s += '4';
            System.out.println(System.identityHashCode(s));
        }
    }

    @Test
    public void t2(){
        StringBuilder s = new StringBuilder();
        for(int i=0;i<10;i++){
            s.append('4');
            System.out.println(System.identityHashCode(s));
        }

    }
}
